var QuickSort = (arr, start=0, end=arr.length-1) => {
  if(start >= end) return
  let basic = arr[start]
  let left = start
  let right = end
  let temp
  while (left < right) {
    while (arr[right] >= basic && left < right) right--
    while (arr[left] <= basic && left < right) left++
    if (left != right) {
      temp = arr[left]
      arr[left] = arr[right]
      arr[right] = temp
    }
  }
  temp = arr[left]
  arr[left] = arr[start]
  arr[start] = temp
  QuickSort(arr, start, left - 1)
  QuickSort(arr, right + 1, end)
}
let arr = [2, 4, 3, 1, 7, 92, 0, 20, 52, 6, 3];
QuickSort(arr);
console.log(arr);
// [2, 4, 9, 1, 7, 92, 0, 20, 52, 6, 3]
// 2  0   1,9          4,20,52,6,3
// 